1. Field of the Invention
The embodiments are generally directed to tessellation in a graphics pipeline. More particularly, the embodiments are directed to balancing a workload in the graphics pipeline pre-tessellation.
2. Background Art
Display images comprise thousands of dots, where each dot represents one of thousands or millions of colors. These dots are known as picture elements, or “pixels”. Each pixel has multiple attributes, such as, color and texture attributes. Those attributes are manipulated and processed before being rendered on a display screen of an electronic device.
Pixels form graphical objects. Example graphical objects include points, lines, polygons, and three-dimensional (3D) solid objects. Points, lines, and polygons represent rendering primitives which are the basis for most rendering instructions. More complex structures, such as 3D objects, are formed from a combination or a mesh of such primitives. To display a particular scene, the visible primitives associated with the scene are drawn individually by determining pixels that fall within the edges of the primitives and manipulating the attributes that correspond to each of those pixels.
Because there are thousands, if not millions of primitives, the inefficient processing of primitives reduces system performance when complex images are rendered on a display screen. Conventional graphics pipelines process generated primitives from patches that include instructions for displaying pixels on a display screen. The patches, depending on size, are divided or combined into prim groups. Each prim group is sent to a shader engine for processing. A shader engine performs tessellation on each patch, and converts control points in each patch to multiple primitives. The number of primitives in each patch depends on a tessellation factor. A tessellation factor may be greater for patches processed by one shader engine in comparison to other shader engines. For example, the tessellation factor is greater for patches that appear closer on the display screen than the patches that appear further on the display screen.
Because tessellation occurs after patches are distributed to shader engines, the shader engines become unbalanced pre-tessellation. This causes one shader engine to process thousands of primitives, while other shader engines remain idle.